package com.origin.netlibrary.download.bean;

import android.util.Log;


import androidx.annotation.IntDef;

import com.origin.netlibrary.download.DownLoadService;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

/**
 * 下载信息
 * Created by ${R.js} on 2018/3/22.
 */

public class DownloadInfo extends DownloadInfoDao {

    //默认状态
    public static final int DOWN_LOAD_STATUS_DEFAULT = 0;
    // 下载中
    public static final int DOWN_LOAD_STATUS_PLAYING = 1;
    // 暂停中
    public static final int DOWN_LOAD_STATUS_PAUSING = 2;
    // 恢复下载
    public static final int DOWN_LOAD_STATUS_RE_START = 3;
    // 下载成功
    public static final int DOWN_LOAD_STATUS_SUCCESS = 4;
    // 删除任务
    public static final int DOWN_LOAD_STATUS_DELETE = 5;


    @IntDef(value = {
            DOWN_LOAD_STATUS_DEFAULT,
            DOWN_LOAD_STATUS_PLAYING,
            DOWN_LOAD_STATUS_PAUSING,
            DOWN_LOAD_STATUS_RE_START,
    })
    @Retention(RetentionPolicy.SOURCE)
    public @interface CurrentStatus {
    }

    @IntDef(value = {
            DOWN_LOAD_STATUS_DEFAULT,
            DOWN_LOAD_STATUS_PLAYING,
            DOWN_LOAD_STATUS_PAUSING,
            DOWN_LOAD_STATUS_RE_START,
            DOWN_LOAD_STATUS_DELETE,
            DOWN_LOAD_STATUS_SUCCESS,
    })
    @Retention(RetentionPolicy.SOURCE)
    public @interface CurrentStatusAction {
    }


    private int currentStatus;

    public long getCurrentStatus() {
        return currentStatus;
    }

    public void setCurrentStatus(@CurrentStatus int currentStatus) {
        currentStatus = currentStatus;
    }

    private DownLoadService service;

    private String name;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public DownLoadService getService() {
        return service;
    }

    public void setService(DownLoadService service) {
        this.service = service;
    }

}
